package com.test.demo.domain;

import com.test.demo.util.GeometryTools;
import com.test.demo.util.SvgUtil;
import javafx.scene.text.Text;
import org.locationtech.jts.awt.PolygonShape;
import org.locationtech.jts.geom.GeometryFactory;

import java.awt.*;
import java.awt.geom.GeneralPath;
import java.io.Serial;
import java.io.Serializable;

public class Robot2 extends Robot implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    public Robot2(int x, int y) {
        super.width = 45;
        super.height = 50;
        shape = SvgUtil.loadSVGPathFromFile(SvgUtil.class.getResourceAsStream("/icons/robot-2.svg"));
        geometry = GeometryTools.shapeToGeometry(shape);

        super.x = x;
        super.y = y;
        super.name = "木";
        super.color = getColorByName();
    }

    @Override
    public void die() {
        super.die();
    }


}
